// cover some element-ui styles

.el-upload {
  input[type="file"] {
    display: none !important;
  }
}

.el-upload__input {
  display: none;
}

.cell {
  .el-tag {
    margin-right: 0;
  }
}

.small-padding {
  .cell {
    padding-right: 5px;
    padding-left: 5px;
  }
}

.fixed-width {
  .el-button--mini {
    min-width: 60px;
    padding: 7px 10px;
  }
}

.status-col {
  .cell {
    padding: 0 10px;
    text-align: center;

    .el-tag {
      margin-right: 0;
    }
  }
}

// to fixed https://github.com/ElemeFE/element/issues/2461
.el-dialog {
  position: relative;
  left: 0;
  margin: 0 auto;
  transform: none;
}

// refine element ui upload
.upload-container {
  .el-upload {
    width: 100%;

    .el-upload-dragger {
      width: 100%;
      height: 200px;
    }
  }
}

// dropdown
.el-dropdown-menu {
  a {
    display: block;
  }
}

// fix date-picker ui bug in filter-item
.el-range-editor.el-input__inner {
  display: inline-flex !important;
}

// to fix el-date-picker css style
.el-range-separator {
  box-sizing: content-box;
}

//---------------form---------------//

/**
 * 解决el-input设置类型为number时，去掉输入框后面上下箭头
 **/
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.el-card.is-always-shadow {
  border-radius: 8px;
  box-shadow: 0 2px 4px 0 rgb(0 0 0 / 0.5);
}

.el-message {
  top: 80px !important;
  min-width: auto;
  padding: 8px 16px;
  background-color: white;
  border-color: #E8EAEF;
  border-radius: 4px !important;
  box-shadow: 0 2px 4px 0 rgb(0 0 0 / 0.08);

  .el-message__icon {
    margin-right: 9px;
    font-size: 18px;
  }

  .el-message__content {
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
    color: #515A6E;
  }

  &.el-message--info .el-icon-info {
    color: #1D7FF2;
    transform: rotate(180deg);

    &::before {
      content: "\e7a3";
    }
  }

  &.el-message--error .el-icon-error {
    color: #C41C24;

    &::before {
      content: "\e7a3";
    }
  }

  &.el-message--warning .el-icon-warning {
    color: #ED7B2F;

    &::before {
      content: "\e7a3";
    }
  }

  &.el-message--success .el-icon-success {
    color: #078D5C;
  }
}

.el-button{
  font-weight: normal !important;
}

.el-button [class*="ri-"] + span {
  margin-left: 5px;
}

.el-form-item__label {
  padding-right: 0 !important;
  color: #515A6E;
}

//---------------table---------------//

// .el-table th.el-table__cell {
//   background-color: unset;
// }

.el-table__fixed-right::before {
  background-color: unset;
}

.el-table__body td {
  border-right: none;
  border-left: none;
}

.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
  background-color: #f9f9f9;
}

.el-table tr {
  border: 1px solid red !important;
}

//---------------from---------------//

.el-input__inner {
  border-color: #BAC3D3 !important;
  border-radius: 4px !important;
}

.el-textarea__inner {
  padding: 7px 10px;
  font-size: 14px;
  border-color: #BAC3D3 !important;
}

.el-button:focus, .el-button:hover {
  color: #449CF5;
  background-color: transparent;
  border-color: #449CF5;
}

.el-button--primary {
  color: #fff !important;
  background-color: #1D7FF2 !important;
  border-color: #1D7FF2 !important;

  &:focus, &:hover,&:active {
    background-color: #449CF5 !important;
    border-color: #449CF5 !important;
  }

  &.is-disabled {
    background-color: #94CEFA !important;
    border-color: #94CEFA !important;
  }

  &.is-plain {
    color: #1D7FF2 !important;
    background: #ecf5ff !important;
    border-color: #b3d8ff !important;
  }
}

.el-table__empty-block {
  position: sticky;
  left: 0;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  // overflow: auto;
}

.el-table__empty-text{
  width: 100%;
  max-height: 100%;
  overflow: auto;
}

.query-form .el-input__inner {
  font-size: 14px !important;
  color: #515A6E !important;
}

.el-pagination.is-background .btn-next,
.el-pagination.is-background .btn-prev,
.el-pagination.is-background .el-pager li {
  width: 32px;
  height: 32px;
  font-size: 14px;
  font-weight: normal;
  color: #515A6E;
  background-color: #fff;
  border: 1px solid #BAC3D3;
  border-radius: 6px;
}

.el-pagination.is-background .active{
  color: #1D7FF2!important;
  background: #fff!important;border: 1px solid #1D7FF2!important;
}

.el-pagination.is-background .el-pager li.more{
  border:none;
}

.el-pagination__sizes .el-input input{
  height: 32px;
  border: 1px solid #BAC3D3;
  border-radius: 6px!important;
}

.el-pagination__rightwrapper .el-pagination__total{
  height: 32px !important;
  margin-right: 2px;
  font-size: 14px !important;
  line-height: 32px !important;
  color: #515A6E !important;
}

.el-pagination__rightwrapper .el-pagination__sizes{
  margin-right: 0;
}

.el-pagination .el-pagination__jump{
  margin-left: 16px!important;

  input{
    height: 32px!important;
    border: 1px solid #BAC3D3!important;
    border-radius: 6px!important;
  }
}

.el-pagination__editor.el-input .el-input__inner,.el-select-dropdown__item {
  font-size: 14px;
  color: #515A6E;
}

.el-tooltip__popper {
  // max-width: 60vw;
  max-width: 400px;
  max-height: 500px;
  overflow: hidden;
}

.el-table__body tr:hover > td {
  background-color: #fff !important;
}

.el-table__body tr.el-table__row--striped:hover > td {
  background-color: #f9f9f9 !important;
}

.el-table .el-table__body tr.hover-row > td {
  background-color: #fff !important;
}

.el-table .el-table__body tr.el-table__row--striped.hover-row > td {
  background-color: #f9f9f9 !important;
}

.el-tablle--enable-row-hover .el-table__body tr:hover > td {
  background-color: #fff !important;
}

.el-tablle--enable-row-hover .el-table__body tr.el-table__row--striped:hover > td {
  background-color: #f9f9f9 !important;
}

.el-table .el-table__fixed-right-patch {
  //  width: 0px !important;
  background: rgb(238 238 238);
}
//可编辑表格样式
.edit-cell {
  padding: 2px 0;
  cursor: pointer;
}

.edit-table .el-table__row{
  height: 66px;
}

.el-submenu .el-menu-item{
  height: 48px !important;
  line-height: 48px !important;
}

.el-form-item{
  margin-right: 12px!important;
  margin-bottom: 16px!important;
}

.el-main{
  padding: 16px;
}

.query-form .el-form-item__content{
  line-height: 0 !important;
}

.el-button+.el-button{
  margin-left: 12px;
}

.el-link{
  font-weight: normal !important;

  &.el-link--primary{
    color: #1D7FF2 !important;
  }
}
//tab标签
.el-tabs__item.is-active{
  background-color:rgb(29 127 242 / .1) ;
}

// 默认表格样式
.el-table {
  .el-checkbox__inner{
    width: 16px;
    height: 16px;
    border-radius: 4px;
  }

  .el-checkbox__inner::after{
    top: 2px;
    left: 5px;
  }

  .el-checkbox__inner::before{
    top: 6px !important;
  }
  // thead .el-checkbox__input.is-indeterminate .el-checkbox__inner{ background: #fff;}
  // thead .el-checkbox__input.is-indeterminate .el-checkbox__inner::before{
  //   position: absolute;
  //   top: 3px !important;
  //   left: 3px;
  //   width: 8px;
  //   height: 8px;
  //   background: #1D7FF2;
  //   border-top: 0;
  //   border-left: 0;
  //   border-radius: 2px;
  //   content: '';
  //   transform: rotate(45deg) scaleY(0);
  //   transform:none;
  // }

  .el-table__cell {
    position: relative;
    padding: 7px 0;
    background-color: unset;
  }

  th.el-table__cell {
    height: 40px;
    font-weight: 500;
    color: #2d3544;
    background-color: #F1F2F5 !important;

    .cell {
      height: 22px;
      padding-left: 16px;
      line-height: 22px;

      &::after{
        position: absolute;
        top: 5px;
        right: 0;
        height: 14px;
        border-left: 1px solid #BAC3D3;
        content: '';
      }
    }
    

    &:nth-last-child(2),
    &:last-child {
      .cell {
        border-right: none;

        &::after{
          position: absolute;
          border-left: 0 solid transparent;
          content: '';
        }
      }
    }
  }

  td.el-table__cell {
    height: 40px;
    font-weight: 400;
    color: #515A6E;
    border-right: none;
  }



  .el-table__footer-wrapper .el-table-column--selection {
    background-color: #F1F2F5 !important;
  }
}

.el-table__fixed-header-wrapper {
  th.el-table__cell {
    &:nth-last-child(2),
    &:last-child {
      .cell {
        &::after{
          position: absolute;
          border-left: 0 solid transparent;
          content: '';
        }
      }
    }
  }
}

.el-table--group {
  th.el-table__cell {
    font-weight: 550;
  }

  .is-group {
    tr {
      th.el-table__cell {
        // border-top: 1px solid #BAC3D3;
        border-right: none;


        &:nth-last-child(2) {
          .cell {
            &::after{
              position: absolute;
              top: 5px;
              right: 0;
              height: 14px;
              border-left: 1px solid #BAC3D3;
              content: '';
            }
          }
        }
      }

      &:first-child {
        th.el-table__cell:not([colspan='1']) {
          // border-top: none;
          &::after{
            position: absolute;
            bottom: 1px;
            left: 50%;
            width: 96%;
            height: 1px;
            margin-left: -48%;
            border-bottom: 1px solid #BAC3D3;
            content: '';
          }

          &:nth-last-child(2) {
            .cell {
              &::after{
                position: absolute;
                border-left: 0 solid transparent;
                content: '';
              }
            }
          }
        }

      }
    }
  }
}

.el-table__row{
  .el-table__cell:not([class*="el-table-column--selection"]){
    .cell{
      padding-right: 2px;
      padding-left: 16px;
    }
  }
}
//表格树样式
.table_tree .el-table__row:not([class*="el-table__row--level-"]){
  td:first-child {
    padding-left: 26px;
  }
}

.el-table .el-table__cell:first-child .cell{
  padding-left: 16px;
}

.el-table .el-table-column--selection:first-child .cell{
  padding-left: 12px;
}

.el-table .el-table-column--selection .cell{
  padding-right: 12px;
}

.el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner{
  background-color:#1D7FF2;
  border-color:#1D7FF2;
}
// 默认公共组织数样式
.common-tree-aside {
  .el-tree-node__content {
    height: 32px;
    line-height: 32px;
    color: #515a6e;
  }

  .el-tree-node__expand-icon {
    color: #515a6e;

    &.is-leaf {
      color: transparent;
    }
  }

  .el-tree-node>.el-tree-node__children {
    overflow: visible;
  }

  .el-tree-node.is-current>.el-tree-node__content {
    box-shadow: 16px 0 #f0f7ff, -16px 0 #f0f7ff;
  }

  .el-tree-node__content:hover {
    box-shadow: 16px 0 #F5F7FA, -16px 0 #F5F7FA;
  }
}

.el-input__inner:focus{
    border: 1px solid rgb(29 127 242 / .1) !important;
}

.el-tree-node__content{
  .el-icon-caret-right:not(.is-leaf)::before{
    position: relative;
    font-size: 16px;
    content: url("@/assets/images/icon-tree-right.svg");
  }
}
// 开关
.el-switch__core{
  width: 44px !important;
  height: 22px;
  background: #BAC3D3;
} 

.el-switch.is-checked .el-switch__core{
  background-color: #1D7FF2;
  border-color: #1D7FF2;
}

.el-switch__core::after{
  top: 2px;
  left: 2px;
}

.el-checkbox,.el-radio,.el-cascader-menu{
  font-weight: 400;
  color: #515a6e;
}

.el-checkbox__input.is-checked+.el-checkbox__label,
.el-radio__input.is-checked+.el-radio__label,
.el-cascader-node.in-active-path, .el-cascader-node.is-active, .el-cascader-node.is-selectable.in-checked-path,
.el-select-dropdown__item.selected,.el-cascader-node.is-selectable.in-active-path{
 color:#1D7FF2;
}

.el-cascader-node:not(.is-disabled):hover,.el-cascader-node:not(.is-disabled):focus{
  background-color: #E8F7FF;
}

.el-radio__input.is-checked .el-radio__inner {
  background-color: #1D7FF2;
  border-color: #1D7FF2;
}
//单选
.el-radio__inner{
  width: 16px;
  height: 16px;
  border-radius: 8px;
}

.el-radio__inner::after{
  width: 6px;
  height: 6px;
}
//多选
.el-checkbox__inner{
  width: 16px;
  height: 16px;

  &::after {
    top: 2px;
    left: 5px;
  }

  &::before {
    top: 6px;
  }
}
//级联选中背景
// .el-cascader-node.is-selectable.in-checked-path{
//   color: rgb(29 127 242 / .1);

// }

// .el-cascader-node:not(.is-disabled):hover{
//   background: rgb(29 127 242 / .1);
// } 

.amap-sug-result {
  z-index: 2024 !important;
}

.table-more-dropdown .el-dropdown-menu__item{
  padding: 0 8px !important;
}

.t-button-no-change-color.el-button--primary{
    color: #fff !important;
    background-color: #1D7FF2 !important;
    border-color: #1D7FF2 !important;
  
    &:focus, &:hover,&:active {
      background-color: #1D7FF2 !important;
      border-color: #1D7FF2 !important;
    }
}

.disabledForm{
  .svg-icon,.el-input__icon{
    display: none;
  }

  .el-input.is-disabled::placeholder,.el-textarea.is-disabled .el-textarea__inner::placeholder{
    color:white !important
  }
}

.TDrawerForm{
  .el-descriptions .el-descriptions-item__label{
    height: 22px;
    padding:10px 16px;
    font-size: 14px;
    line-height: 22px;
    border: 1px solid #E8EAEF;
  }

  .el-descriptions-item__label{
    width:174px;
  }

  .el-descriptions-item__content{
    height: 40px;
    padding:0 !important;
  }
}
// Tabs 标签页
.base-tabs-box.el-tabs--top {
  .el-tabs__item {
    height: 48px;
    padding: 0 16px !important;
    font-size: 16px;
    font-weight: 500;
    line-height: 48px;
    color: #959eb2;

    & + .el-tabs__item::before {
      display: block;
      position: absolute;
      top: 14px;
      left: 0;
      width: 1px;
      height: 20px;
      background-color: #eee;
      content: "";
    }

    &.is-active {
      color: #1d7ff2;
    }

    &.is-active::after {
      display: block;
      position: absolute;
      right: 0;
      bottom: 0;
      left: 0;
      height: 2px;
      background-color: #1d7ff2;
      content: "";
    }

    &.is-active + .el-tabs__item::before {
      display: none;
    }
  }
}

